<script lang="ts" setup>
import { ref } from 'vue';

import { VbenButton } from '@vben/common-ui';

import FromModal from './components/from.vue';

const fromModalRef = ref();

function openModal() {
  fromModalRef.value.setData({
    content: '外部传递的数据 content',
    payload: '外部传递的数据 payload',
  });
  fromModalRef.value.open();
}
</script>

<template>
  <div>
    <VbenButton @click="openModal">Open</VbenButton>
    <FromModal ref="fromModalRef" />
  </div>
</template>
